<?php

class Application_Model_DbTable_FraisForfait extends Zend_Db_Table_Abstract {

    protected $_name = 'fraisforfait';

    public function obtenirFraisForfait($id) {
        $row = $this->fetchRow("id='" . $id . "'");
        if (!$row) {
            throw new Exception("Impossible de trouver l'enregistrement $id");
        }
        return $row->toArray();
    }
    
    public function modifierFraisForfait($id, $libelle, $montant) {
        $data = array(
            'id' => $id,
            'libelle' => $libelle,
            'montant' => $montant,
        );
        $this->update($data, "id='" . $id . "'");
    }

}

